package edu.ccut.titan.tag.report.design;

public class ReportFieldInfo {
	
	public final static int TITLE_HEIGHT_DEFAULT_VALUE = 20;
	
	public final static int FIELD_HEIGHT_DEFAULT_VALUE = 19;
	
	private String key;
	
	private String title = "";
	
	private int width = 50;
	
	private int titleHeight = TITLE_HEIGHT_DEFAULT_VALUE;
	
	private int height = FIELD_HEIGHT_DEFAULT_VALUE;
	
	private String className = String.class.getName();
	
	private String express = null;
	
	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public int getTitleHeight() {
		return titleHeight;
	}

	public void setTitleHeight(int titleHeight) {
		this.titleHeight = titleHeight;
	}

	public String getExpress() {
		if (this.express != null) {
			return express;
		}
			
		return "$F{" + key + "} != null ? $F{" + key + "} : \"\"";
	}

	public void setExpress(String express) {
		this.express = express;
	}
}
